<template>
  <header class="app-header">
    <div class="logo">
      <router-link to="/">智能写作平台</router-link>
    </div>
    <nav class="main-nav">
      <router-link to="/" class="nav-item">首页</router-link>
      <router-link to="/articles" class="nav-item">文章管理</router-link>
      <router-link to="/editor" class="nav-item">创建文章</router-link>
      <router-link to="/settings" class="nav-item">系统设置</router-link>
    </nav>
    <div class="user-actions">
      <el-dropdown>
        <span class="user-dropdown">
          用户名 <el-icon><arrow-down /></el-icon>
        </span>
        <template #dropdown>
          <el-dropdown-menu>
            <el-dropdown-item>个人中心</el-dropdown-item>
            <el-dropdown-item>退出登录</el-dropdown-item>
          </el-dropdown-menu>
        </template>
      </el-dropdown>
    </div>
  </header>
</template>

<script setup>
import { ArrowDown } from '@element-plus/icons-vue'
</script>

<style scoped>
.app-header {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 60px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo {
  font-size: 20px;
  font-weight: bold;
  margin-right: 40px;
}

.logo a {
  color: #409eff;
  text-decoration: none;
}

.main-nav {
  flex: 1;
  display: flex;
}

.nav-item {
  margin-right: 24px;
  color: #606266;
  text-decoration: none;
  font-size: 14px;
}

.nav-item.router-link-active {
  color: #409eff;
  font-weight: 500;
}

.user-dropdown {
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #606266;
}
</style> 